package com.zengguang.testkaoshi.services.impl;

import com.zengguang.testkaoshi.dao.TestquestionsDao;
import com.zengguang.testkaoshi.pojo.Testquestions;
import com.zengguang.testkaoshi.services.ITestquestionsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TestquestionsService implements ITestquestionsService {
    @Autowired
    private TestquestionsDao testquestionsDao;
    @Override
    public int insertTestquestions(Testquestions testquestions) {
        int returnInt=0;
        int addClassInt=testquestionsDao.insertTestquestions(testquestions);
        returnInt=addClassInt;
        return returnInt;
    }

    @Override
    public int updateTestquestions(Testquestions testquestions) {
        int returnInt=0;
        int updateStudentInt=testquestionsDao.updateTestquestions(testquestions);
        returnInt=updateStudentInt;
        return returnInt;
    }

    @Override
    public List<Testquestions> selectAllTestquestions() {
        List<Testquestions> list=testquestionsDao.selectAllTestquestions();
        return list;
    }

    @Override
    public int deleteTestquestions(int testquestionsid) {
        int temp=0;
        temp=testquestionsDao.deleteTestquestions(testquestionsid);
        return temp;
    }
}
